package com.lvandroid.transport.task;

import com.arialyy.aria.core.task.UploadTask;

public class UpLoadTaskInfo extends TaskInfo {

    public UpLoadTaskInfo(UploadTask task) {
        this.mTaskId = task.getEntity().getId();
        this.mTaskUrl = task.getEntity().getUrl();
        this.mFilePath = task.getEntity().getFilePath();
        this.mTaskType = TASK_TYPE_UPLOAD;
        this.mCurrentTaskLength = task.getEntity().getCurrentProgress();
        this.mTotalTaskLength = task.getEntity().getFileSize();
        this.mPercent = task.getEntity().getPercent();
    }

    public UpLoadTaskInfo(long id, String url, String filePath) {
        this.mTaskId = id;
        this.mTaskUrl = url;
        this.mFilePath = filePath;
        this.mTaskType = TASK_TYPE_UPLOAD;
    }

    @Override
    public boolean saveTask() {
        return false;
    }

    @Override
    public boolean deleteTask() {
        return false;
    }
}
